package com.wyg.epdata.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyg.epdata.entity.DataResult;
import com.wyg.epdata.entity.respones.SourceRes;
import com.wyg.epdata.entity.vo.CountByDate;
import com.wyg.epdata.entity.vo.DataResultVO;
import com.wyg.epdata.mapper.DataResultMapper;
import com.wyg.epdata.service.DataResultService;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Author: WangYongGan
 * @Date: 2021/10/31 0:37
 * @Description:
 */
@Component
public class DataResultServiceImpl extends ServiceImpl<DataResultMapper, DataResult> implements DataResultService {


    @Override
    public List<DataResultVO> getSixRegData() {
        //最新数据
        QueryWrapper<DataResult> wrapper = new QueryWrapper<>();
//        wrapper.orderByAsc("")
//        baseMapper.selectList()
        return null;
    }


    @Override
    public Map<String, Integer> getTotalInfo() {
        return null;
    }

    @Override
    public int getCountTotal() {
        return baseMapper.getCountTotal();
    }

    @Override
    public int getCountReg() {
        return baseMapper.getCountReg();
    }

    @Override
    public List<SourceRes> getCountOfSource() {
        return baseMapper.getCountOfSource();
    }

    @Override
    public List<SourceRes> getCountOfSourceByCompany(String entity) {
        return baseMapper.getCountOfSourceByCompany(entity);
    }

    @Override
    public List<CountByDate> getCountRegByDate(String begin, String end) {
        return baseMapper.getCountRegByDate(begin, end);
    }

    @Override
    public List<CountByDate> getCountPoiByDate(String begin, String end) {
        List<CountByDate> countPoiByDate = baseMapper.getCountPoiByDate(begin, end);
        return countPoiByDate;
    }
}
